Apparatus and method for efficient evaluation of equations which generate frame tags in a network switch

ABSTRACT

A network switch, configured for performing layer  2  and layer  3  switching in an Ethernet (IEEE 802.3) network includes a network switch port having a filter configured for evaluating an incoming data packet. The filter includes a min term memory configured or storing min term values. Each min term value is stored based on a location of a corresponding selected byte of the incoming data packet for comparison, an expression portion specifying a corresponding comparison operation, and a template identifier field that specifies templates that use the corresponding min term. The template identifier field includes an equation identifier and an obsolete equation identifier. A header memory is configured for storing an effect min term and a plurality of equation identifiers. The effect min term specifies which min terms are necessary for comparison. A min term generator is configured for simultaneously comparing a received byte of the incoming data packet with the necessary min terms that correspond to the received byte and generates respective min term comparison results. An equation core is configured for evaluating equations and for generating a frame tag identifying the incoming data packet based on the min term comparison results relative to the templates. The equation core is configured to identify equations which are no longer relevant. A content addressable memory (CAM) is configured to store the equations which are no longer relevant. A min term controller is configured to generate the effect min term and to update the effect min term based on a comparison between the contents of the CAM and the equation identifiers of the header memory.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to layer 2 (and above) switching of data packets in a non-blocking network switch configured for switching data packets between subnetworks and more particularly to the efficient evaluation of equations at a network switch port.

2. Background Art

Local area networks use a network cable or other media to link stations on the network. Each local area network architecture uses a media access control (MAC) enabling network interface devices at each network node to access the network medium.

The Ethernet protocol IEEE 802.3 has evolved to specify a half-duplex media access mechanism and a full-duplex media access mechanism for transmission of data packets. The full-duplex media access mechanism provides a two-way, point-to-point communication link between two network elements, for example between a network node and a switched hub.

Switched local area networks are encountering increasing demands for higher speed connectivity, more flexible switching performance, and the ability to accommodate more complex network architectures. For example, commonly-assigned U.S. Pat. No. 5,953,335 discloses a network switch configured for switching layer 2 type Ethernet (IEEE 802.3) data packets between different network nodes; a received data packet may include a VLAN (virtual LAN) tagged frame according to IEEE 802.1q protocol that specifies another subnetwork (via a router) or a prescribed group of stations. Since the switching occurs at the layer 2 level, a router is typically necessary to transfer the data packet between subnetworks.

Efforts to enhance the switching performance of a network switch to include layer 3 (e.g., Internet protocol) processing may suffer serious drawbacks, as current layer 2 switches preferably are configured for operating in a non-blocking mode, where data packets can be output from the switch at the same rate that the data packets are received. Newer designs are needed to ensure that higher speed switches can provide both layer 2 and above switching capabilities for faster speed networks such as 100 Mbps or gigabit networks.

However, such design requirements risk loss of the non-blocking features of the network switch, as it becomes increasingly difficult for the switching fabric of a network switch to be able to perform layer 3 processing at the wire rates (i.e., the network data rate).

Commonly assigned U.S. patent application Ser. No. 09/430,753, filed Oct. 29, 1999 and entitled “Apparatus And Method For Identifying Data Packet Types In Real Time On A Network Port Switch” discloses one arrangement that enables a network switch port to provide layer 2 and above switching capabilities. In these disclosed arrangement, equations are evaluated in a network switch port based on min term comparisons to generate a tag which identifies the incoming data packet, as well as the action that needs to be performed by the network switch port. For example, assume the following equation is evaluated: EQ1 = M1 * M2 * M3 * M4 + M1 * M5 * M6 * M7 $\begin{matrix} {{{Where}\quad {M1}} = \quad {{{IPv4}\quad {frame}}//{{{byte}\quad (0)}=={8^{\prime}{hx4}}}}} \\ {{M2} = \quad {{protocol}\quad {field}\quad {is}\quad {TCP}}} \\ {{M3\ldots}\quad} \end{matrix}\quad$

In conventional arrangements, the equation EQ1 is evaluated by comparing each of the min terms M1, M2, M3 . . . If the comparison for each min term is a true condition, then the end condition is matched in EQ1 causing a tag to be generated which corresponds to the condition specific for EQ1. Although this equation evaluation technique is effective, conventional implementation techniques may cause unnecessary computations to be performed on the equation. For example, in EQ1, if the incoming frame is not a IPv4 frame, this equation is deemed false after evaluation of the min term M1 with the first byte. Thus, the continued evaluation of min terms M2, M3 . . . M7 wastes resources, reducing the computing efficiency in the network switch port.

SUMMARY OF THE INVENTION

There is a need for an arrangement that enables a network switch to provide layer 2 switching and layer 3 switching capabilities for 100 Mbps and gigabit links without blocking of the data packets.

There is also a need for an arrangement that improves the evaluation of equations so that once the result of the equation is know, no further computations are performed on the equation.

These and other needs are attained by the present invention, where a network switch includes network switch port filter configured for evaluating an incoming data packet. The filter includes a min term memory configured for storing min term values. Each min term value is stored based on a location of a corresponding selected byte of the incoming data packet for comparison, an expression portion specifying a corresponding comparison operation, and a template identifier field that specifies templates that use the corresponding min term. The template identifier field includes an equation identifier and an obsolete equation identifier. A header memory is configured for storing an effect min term and a plurality of equation identifiers. The effect min term specifies which min terms are necessary for comparison. A min term generator is configured for simultaneously comparing a received byte of the incoming data packet with the necessary min terms that correspond to the received byte and generates respective min term comparison results. An equation core is configured for evaluating equations and for generating a frame tag identifying the incoming data packet based on the min term comparison results relative to the templates. The equation core is configured to identify equations which are no longer relevant. A content addressable memory (CAM) is configured to store the equations which are no longer relevant. A min term controller is configured to update the effect min term based on a comparison between the contents of the CAM and the equation identifiers of the header memory.

One aspect of the present invention provides a method, in a network switch, of evaluating an incoming data packet at a network switch port. The method includes storing a plurality of templates for equations configured for identifying respective data formats, each template having at least one min term configured for comparing a corresponding prescribed value to a corresponding selected byte of the incoming data packet. Header information associated with the min terms is also stored. The header information includes effect min term fields and a plurality of equation identifiers. Each effect min term field specifies which mm terms are necessary for comparison with the corresponding selected byte. The effect min term is read to specify which of the min terms are necessary for comparison. The method includes simultaneously comparing, to the selected byte, the necessary min terms that correspond to the selected byte as the selected byte is received by the network switch port. An obsolete equation is identified which needs no further evaluation based on a comparison of the necessary min terms with the selected byte. The obsolete equation is stored in a content addressable memory (CAM). The effect min term fields are updated based on the obsolete equation specified in the CAM.

Thus, the apparatus and method if the invention advantageously reduces the processing of equations by not evaluating equations which are determined to be obsolete.

Additional advantages and novel features of the invention will be set forth in part in the description which follows and in part will become apparent to those skilled in the art upon examination of the following or may be learned by practice of the invention. The advantages of the present invention may be realized and attained by means of instrumentalities and combinations particularly pointed in the appended claims.

BRIEF DESCRIPTION OF THE DRAWINGS

Reference is made to the attached drawings, wherein elements having the same reference numeral designations represent like element elements throughout and wherein:

FIG. 1 is a block diagram of a packet switched network including multiple network switches for switching data packets between respective subnetworks according to an embodiment of the present invention.

FIG. 2 is a diagram illustrating a conventional layer 2 Ethernet-type data packet carrying a layer three Internet Protocol (IP) packet.

FIG. 3 is a block diagram illustrating a network switch port of FIG. 1, according to an embodiment of the present invention.

FIGS. 4A and 4B are each a diagram illustrating simultaneous processing of two templates of an equation by the min term generator of FIG. 3.

FIG. 5 is a diagram illustrating in further detail the simultaneous processing of min terms by the min term generator of FIG. 3.

FIG. 6 is the data structure of Header-RAM buffer of FIG. 3.

FIG. 7 is a diagram illustrating a table entry of a min term in the min term memory of FIG. 3.

BEST MODE FOR CARRYING OUT THE INVENTION

FIG. 1 is a block diagram illustrating a packet switched network 10, such as an Ethernet (IEEE 802.3) network. The packet switched network includes integrated (i.e., single chip) multiport switches 12 that enable communication of data packets between network stations 14. Each network station 14, for example a client workstation, is typically configured for sending and receiving data packets at 10 Mbps or 100 Mbps according to IEEE 802.3 protocol. Each of the integrated multiport switches 12 are interconnected by gigabit Ethernet links 16, enabling transfer of data packets between subnetworks 18 a, 18 b, and 18 c. Hence, each subnetwork includes a switch 12, and an associated group of network stations 14.

Each switch 12 includes a switch port 12 that includes a media access control (MAC) module 22 and a packet classifier module 24. The MAC module 20 transmits and receives data packets to the associated network stations 14 across 10/100 Mbps physical layer (PHY) transceivers (not shown) according to IEEE 802.3u protocol. Each switch 12 also includes a switch fabric 25 configured for making frame forwarding decisions for received data packets. In particular, the switch fabric 25 is configured for layer 2 switching decisions based on source address, destination address, and VLAN information within the Ethernet (IEEE 802.3) header; the switch fabric 25 is also configured for selective layer 3 switching decisions based on evaluation of an IP data packet within the Ethernet packet.

As shown in FIG. 1, each switch 12 has an associated host CPU 26 and a buffer memory 28, for example an SSRAM. The host CPU 26 controls the overall operations of the corresponding switch 12, including programming of the switch fabric 25. The buffer memory 28 is used by the corresponding switch 12 to store data frames while the switch fabric 25 is processing forwarding decisions for the received data packets.

As described above, the switch fabric 25 is configured for performing layer 2 switching decisions and layer 3 switching decisions. The availability of layer 3 switching decisions may be particularly effective if an end station 14 within subnetwork 18 a wishes to send an e-mail message to selected network stations in subnetwork 18 b, 18 c, or both; if only layer 2 switching decisions were available, the switch fabric 25 of switch 12 a would need to send the e-mail message to a router (not shown), which would introduce additional delay.

FIG. 2 is a diagram illustrating an Ethernet (IEEE 802.3) packet 30 carrying an IP packet 32 as payload data. Specifically, the Ethernet packet 30 includes a start frame delimiter (SFD) 34, an Ethernet header 36, the IP packet 32, and a cyclic redundancy check (CRC) or frame check sequence (FCS) field 38. Hence, a switch fabric 25 configured for layer 3 switching decisions needs to be able to quickly process the IP packet 32 within the received Ethernet frame 30 to avoid blocking of the frame within the switch.

According to the disclosed embodiment, the packet classifier module 24 of FIG. 1 is configured for multiple simultaneous comparisons between the incoming data stream and templates that identify the data format of the incoming data stream. Specifically, users of the host processor 26 will specify policies that define how data packets having certain IP protocols should be handled by the switch fabric 25. These policies are implemented by loading into the switch fabric 25 a set of frame forwarding decisions for each corresponding IP protocol type. Hence, the switch fabric 25 could include one set of frame forwarding instructions for an HTTP packet, another set of frame forwarding instructions for an SNMP packet, and another set of frame forwarding instructions for a high-priority packet (e.g., video, or voice, etc.).

FIG. 3 is a block diagram illustrating a packet classifier module 24 of a network switch port 20 shown in accordance with the invention. As shown, the network switch port 20 includes a MAC 22, a receive FIFO buffer 27, a header modifier 29, and the packet classifier module 24. The packet classifier module 24, also referred to as a network switch port filter, is configured for identifying (i.e., evaluating) the incoming data packet at the network switch port 20, and supplying to the switch fabric 25 a tag that specifies the action to be performed on the data packet based on type of data packet being received. Specifically, the packet classifier module 24 simultaneously compares the incoming data packet with a plurality of templates configured for identifying respective data formats. The packet classifier module 24, based on the comparison between the incoming data packet and the plurality of templates, identifies an equation to be executed that specifies the tag to be supplied to the switch fabric 25.

Specifically, the packet classifier module 24 generates a comparison result that identifies the incoming data packet by detecting at least one matched template from a plurality of templates. The packet classifier module 24 then identifies which of the equations includes the matched template, and generates the tag specified by the equation.

FIGS. 4A and 4B are diagrams illustrating the simultaneous processing of two templates of an equation by the packet classifier module 24. FIG. 4A illustrates the logical evaluation by the packet classifier module 24 of the equation:

Eq1=M 1 *M 2*M 3*M 4*(M 5 +M 6+M 7+M 8).

FIG. 4B illustrates how the equation Eq1 would actually be stored in the central min term memory 71. The equation Eq1 includes four templates 62 a, 62 b, 62 c, and 62 d: the template 62 a includes the min terms M1, M2, M3, M4, and M5; the template 62 b includes the min terms M1, M2, M3, M4, and M6: the template 62 c includes the min terms M1, M2, M3, M4, and M7; and the template 62 d includes the min terms M1, M2, M3, M4, and M8. Each template 62 corresponds to a specific IP data format recognizable based on the header of the IP data packet 32. For example, templates 62 a and 62 c may be configured for identifying an HTTP packet, and templates 62 b and 62 d be may be configured for identifying an SNMP packet. Specifically, an HTTP packet is identified if it is in IPv4 format, the time to live field in IP is bigger than one, the protocol field in IP header is TCP, header checksum is correct, source TCP port is 80 or destination TCP port is 80. An SNMP packet is identified if it is in IPv4 format, the time to live field in IP is bigger than one, the protocol field in IP header is TCP, header checksum is correct, source TCP port is 25 or destination TCP port is 25.

Hence, the following min terms may be established to represent all the above-described criteria:

M1=packet is in IPv4 format

M2=time to live field in IP is bigger than one

M3=protocol field in IP header is TCP

M4=header checksum is correct

M5=source TCP port is 80

M6=destination TCP port is 80

M7=source TCP port is 25

M8=destination TCP port is 25

Hence, the templates 62 a and 62 c identify HTTP packets, and the templates 62 b and 62 d identify SNMP packets. Thus, equation one (Eq1) specifies that a specific result (e.g., the tag having a specified value) should be output to the switch fabric 25 if either template 62 a, 62 b, 62 c, or 62 d are true.

Moreover, the min terms M1 . . . M8 are arranged within the associated templates 62 a and/or 62 b in a prescribed order that corresponds to the relative position of a data byte in the incoming data stream. As illustrated in FIG. 5, the min term M1 is configured for comparison with the first byte (B1) of the IP packet 32, the min term M2 is configured for comparison with a subsequent byte (B2) of the IP packet 32 that follows B1, the min term M3 is configured for comparison with a subsequent byte (B3) that follows B2, etc. Hence, the use of templates 62 having min terms in an order based on the relative position of a data byte in the incoming data stream enables multiple simultaneous comparisons between the incoming data stream and min terms. Hence, an incoming data packet can be compared to multiple templates to determine not only the data format of the incoming data packet, but also what action needs to be performed by the switch fabric 25.

As shown in FIG. 3, the packet classifier 24, also referred to as a network switch port filter, includes a min term memory 70. The min term memory 70 stores the min term values (e.g., M1, M2, etc.) as illustrated in FIG. 7, described below. The packet classifier 24 also includes a frame identifier 72 configured for identifying the type of layer 2 information being received. In particular, identifying the type of layer 2 information being received (e.g., Ethernet, IEEE 802 to 3, etc.) enables identification of the start position 64 of the IP packet 32 within the layer 2 packet 30. The packet classifier 24 also includes a min term controller 74, a min term generator 76, an equation core 78, and an evaluation results memory 80. The min term controller 74 is configured for fetching the stored min terms from the min term memory 70 corresponding to a selected byte of the IP frame 32. The min term controller 74 also includes a location converter configured for specifying the actual byte location (byte_location) of the start point 64 in response to receiving a frame type (frm_type) signal from the frame identifier 72 that specifies the type of layer 2 information. Hence, the min term controller 74, in response to detecting the beginning of the IP packet, fetches all the min terms that are to be compared with the first byte (B1) of the IP packet 32, for example min terms M1, M9, and M14 for equations Eq1, Eq2, and Eq3 in FIG. 5. The min term controller 74 then forwards the min term values (M_STRU INFO) to the min term generator 76 and the equation core 78.

The min term generator 76 performs the actual min term comparisons between the min terms fetched by the min term controller and the selected byte of the incoming data stream. For example, the min term generator 76 simultaneously compares in FIG. 5 the incoming data byte B1 with the min terms M1, M9, and M14, and provides the min term comparison results (mt_result) to the equation core 78. During the next comparison cycle, the min term generator 76 simultaneously compares the incoming data byte B2 with the min terms M2, M10, and M15. According to the disclosed embodiment, the min term generator is configured for simultaneously comparing the incoming data stream to up to eight min terms.

The equation core 78 is configured for generating a frame tag based on the min term comparison results received from the min term generator 76, relative to the relevant templates 62. For example, the equation core 78 evaluates equation 1, illustrated in FIGS. 5A, 5B, by evaluating the min term results sequentially as the results are supplied from the min term generator. For example, if the comparisons for each of the min terms M1, M2, M3, M4, M5, and M6 result in a true condition, described below with respect to FIG. 7, then the end condition is matched in equation 1, causing the equation core 78 to generate a tag corresponding to the condition specified for equation 1. The frame tag identifies the nature of the incoming data packet, as well as the action that needs to be performed by the switch fabric 25.

FIG. 7 is a diagram illustrating the data format of the min term structure in the min term memory 70. According to the disclosed embodiment, the min terms are stored in the min term memory 70 in an order corresponding to the relative position of the data byte to be compared. Hence, all min terms that are to be compared to the first data byte are stored together in a first part of the min term memory, followed by min terms to be compared with the second data byte, etc.

Alternatively, the min terms may be stored in an order based on relevant information within the IP header, as well as the relative position of the data byte to be compared. Hence, the min terms may be stored in an order for comparing the sequence of data bytes providing the source IP address, destination IP address, and source and source and destination ports; in this case, non-relevant data bytes at the beginning of the IP frame would not have associated min terms stored at the beginning of the min term memory 70, further improving the efficiency of the min term memory 70.

Each table entry 90 includes a min term portion and an evaluation portion. The min term portion includes a location field (LOCATION) 92, a mask field (MASK) 94, an expected data field (EXP_DATA) 96, and an operator field (OPERATOR) 98. Based on the position of the table entry 90 in the min term memory 70, the min term controller 74 is able to determine which byte of the IP packet 32 that needs to be compared with the corresponding min term, relative to the beginning 64 of the IP packet. The mask field 94 is a mask that is used by the min term generator 76 in performing comparisons; if the mask has a bit set to 1, the value is compared, and if the mask value has zeros in the field, the comparison is a don't care. The expected data field 96 specifies the expected data to be compared with the relevant data byte of the IP packet 32. The operator field 98 specifies the type of comparison to be performed by the min term generator, for example: less than, less than or equal to, equal to, greater than, greater than or equal to, and not equal to.

The evaluation portion includes a branches portion 100, a response portion (RINP1) 102 for the case where the comparison of the min term portion is true, a second response portion (RINP0) 106 for the case where the comparison of the min term portion is false, an equation identifier 110 and, in accordance with the invention, an obsolete equation field (OE) 112. The branches portion 100 species the order of the OR term in the equation; for example, the min term M1 as shown is FIGS. 4A, 4B and 5 would have its branches portion set to 0000 1111, indicating that the first four branches of the equation specified in the equation identifier field 110 are to include the corresponding min term. The use of eight bits for the branches portion assumes that there are a maximum of eight branches in any given equation.

The response portion 102 specifies the operation to be performed if the min term portion is evaluated as true relative to the compared data byte. In particular, the finish bit (FIN) is set to one if the results of the equation is determined if the min term result is true; the back to initial (BINIT) is set to one if the evaluation process should return to the initial state (init) if the min term result is true. For example, in the case of min term M1, the FIN bit and the BINIT bit of RINP1 are set to zero, since additional comparisons are needed if the min term result is true. In the case of min terms M5, M6, M7, and M8, the FIN bit of RINP1 is set to one, since a comparison result of “true” results in the end of the evaluation, as shown in FIGS. 4A, 4B.

The response portion 106 specifies the operation to be performed if the min term portion is evaluated as false relative to the compared data byte. In particular, the finish bit (FIN) is set to one if the results of the equation is determined if the min term result is false; the back to initial (BINIT) is set to one if the evaluation process should return to the initial state (init) if the min term result is false. For example, in the case of min term M1, the FIN bit is set to zero and the BINIT bit of RINP1 is set to one, such that the equation would return to the INIT state if the min term result M1 was false, as shown in FIGS. 4A, 4B.

The equation identifier field 110 identifies the equation (or template if there is only one template in an equation) that the min term corresponds to.

The obsolete equation field 112 identifies whether an obsolete equation CAM 216 (FIG. 6) should be updated to include an equation identifier, as will be explained more fully below.

Hence, the equation core 78 determines whether any specified equation has a template 62 that matches the incoming data stream. Based on the multiple simultaneous comparisons of the incoming data stream with the multiple templates 62, the equation core 78 can identify a matching equation, and generate the appropriate tag corresponding to the matched equation for help it to the switching fabric 25. If desired, the core 78 by also output a command to the header modifier 29 to modify the layer 2 header, the layer 3 header, or both, before transferring the data to the switch.

In order to make the evaluation of the equations more efficient, with reference to FIGS. 3 and 6, a header ram 200 is provided. The header ram 200 is one of two memories; namely the header ram 200 is a first memory holding header information associated with the min terms. Memory 70 (FIG. 3) is the min term memory which stores the actual min term data. With respect to the header ram 200 as shown in FIG. 6, the first field is the effect min term 210 and the second field is the valid min term 212 followed by up to 32 min term identifiers 214 which specify an equation identifier.

The valid min term 212 is simply used from a programming standpoint to identify which entries are valid, as opposed to which entries have invalid data. The effect min term 210 specifies which of the min terms are necessary for comparison by the min term controller 74. Necessary min terms are those min terms which are required to determine whether an equation is true or false. An equation reduction module 75 (Eq_rd) is provided as part of the min term controller 74 and is always one buffer ahead of the min term controller 74. The equation reduction module 75 generates the effect min term for each buffer. The equation reduction module 75 reads the EID 110 of the min term 90 and sends it to the obsolete equation CAM 216. The min term controller 74 reads the effect min term 210 to determine which of the min terms specified in the header are necessary for comparison. The min term controller 74 forwards those min term values to the min term generator 76 for comparison with the corresponding data byte, and forwards the results to the core 78. The core 78 evaluates the min term results and, if the core 78 determines that some of the equations are no longer necessary, the core 78 will send, based on the equation identifiers, the obsolete equation to an equation CAM 216 (OE_CAM). Initially, the equation CAM 216 is empty and can be initialized with a nonexistent equation identifiers. The equation reduction module 75 will then read the next iteration of the effect min term, pull the equation identifiers from the header 200, and update the effect min term based on a comparison between the contents of the equation CAM 216 and the specified equations in the header 200.

By way of example, effect min term 210 of FIG. 6 has the hexidecimal value ffff, meaning that all the values are one so that all four rows include necessary min terms to be used in the comparison with the corresponding equations. After the first round of evaluation for the first relevant data byte, the core module 78 will conclude that equations 5, 6, 1 and 9 are no longer necessary to evaluate and the equation CAM 216 will be updated accordingly, as shown in FIG. 6. The equation CAM 216 will then read the effect min term 210, and compare the identified equations, namely Equation 1, Equation 5, Equation 6 and Equation 9 from the first row of the header and see that those same equations are identified in the equation CAM 216. In response, equation reduction module 75 will update the effect min term 210′ to have the value of fff0, representing that the first row of equations are not necessary and not to be considered, and that the subsequent rows, starting with Equation 11, 21, and 23, respectively, are still necessary and should be considered. The sequence continues until the comparison process gets near the end of the equation.

The implementation of the this invention using the CAM-based scheme will be appreciated with reference to Equation 2 below:

Eq2=M 2*M 4*M 5*M 6+M 2*M 4*M 8

As shown in FIG. 7, the min terms include the additional obsolete equation field 112 which represents the obsolete equation identifier bit. The obsolete equation bit 112 is used to specify whether or not, in response to determining that the corresponding equation is not necessary due to comparison of the min term, the equation CAM 216 should be updated to include the equation identifier EID 110. For example, with reference to Eq2, the obsolete equation bits for min terms M2, M4, M5, M6 and M8 are set to equal 1,1,0,0 and 0, respectively. This is interpreted as follows: the obsolete equation 112 bit is set to 1 for min terms M2 and M4 because those two min terms are common in both branches of Eq2. Thus, if either of these min terms equals 0, then the entire equation Eq2 is deemed not necessary for future comparisons. Min terms M5 and M6 belong only to the first branch so that even if the comparison results for M5 and M6 is 0, the second branch may still apply for Eq2. The obsolete equation 112 bit for min term M8 is set to 0 because adding Eq2 to the obsolete CAM 216 at this point would be trivial and a waste of CAM space because the evaluation of Eq2 is finished so it is impossible to do any further pruning of the min terms.

The use of CAMs, namely content-addressable memories, can be very expensive to the point that the implementation of the invention uses 32 entries in the obsolete equation CAM 216 for servicing up to 64 equations.

Thus, it can be seen that the invention advantageously provides an apparatus and method of discontinuing evaluation of equations as soon as the result of the equation is know. This saving of computation power increases the efficiency of the controller 74, enabling simultaneous comparisons of received frame data with multiple templates. Hence, evaluation of data frames can be completed before the frame data needs to be transferred from the network switch port.

While this invention has been described with what is presently considered to be the most practical preferred embodiment, it is to be understood that the invention is not limited to the disclosed embodiments, but, on the contrary, is intended to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims. 

What is claimed is:
 1. A method of evaluating an incoming data packet at a network switch port, the method comprising: storing a plurality of templates for equations configured for identifying respective data formats, each template having at least one min term configured for comparing a corresponding prescribed value to a corresponding selected byte of the incoming data packet, storing header information associated with the min terms, the header information including effect min term fields and a plurality of equation identifiers, each effect min term field specifying which min terms are necessary for comparison with the corresponding selected byte, reading the effect min term to specify which of the min terms are necessary for comparison, simultaneously comparing, to the selected byte, the necessary min terms that correspond to the selected byte as the selected byte is received by the network switch port, identifying an obsolete equation which needs no further evaluation based on a comparison of the necessary min terms with the selected byte, storing, in a content addressable memory (CAM), the obsolete equation, and updating the effect min term fields based on the obsolete equation specified in the CAM.
 2. The method of claim 1, wherein the simultaneously comparing step includes: loading the relevant min terms corresponding to a first of the data bytes into a min term generator; comparing in parallel the min terms loaded in the min term generator with the first of the data bytes; and outputting comparison results for the min terms loaded in the min term generator to an evaluation core, and wherein the step of evaluation equations includes evaluating the equations in the equation core.
 3. The method of claim 1, further comprising: generating a comparison result that identifies the incoming data packet, based on the evaluated equation, and outputting a frame tag, based on an evaluated equation, to a switch fabric configured for selectively switching the incoming data packet based on the corresponding frame tag.
 4. The method of claim 1, wherein the step of storing a plurality of templates includes storing each min term in a min term memory and the step of storing header information includes storing the header information associated with each min term in a header RAM distinct from the min term memory.
 5. The method according to claim 1, wherein the step of storing templates includes storing, in a memory as a table entry, each table entry having a location in the memory based on a location of the corresponding selected byte in the incoming data packet, the table entry including a min term expression portion specifying the corresponding prescribed value and a comparison operand, and a template identifier field that specifies the templates that use the corresponding min term, the template identifier including an equation identifier (EID) and an obsolete equation identifier (OE), the obsolete equation identifier specifies whether or not the CAM should store the equation identifier (EID), the method further comprising updating the obsolete equation identifier (OE) based on a determination of whether or not the min term is deemed necessary to evaluate an equation.
 6. The method according to claim 1, wherein the data packet has an Internet Protocol (IP) format.
 7. A network switch port filter configured for evaluating an incoming data packet, comprising: a min term memory configured for storing min term values, each min term value stored based on a location of a corresponding selected byte of the incoming data packet for comparison, an expression portion specifying a corresponding comparison operation, and a template identifier field that specifies templates that use the corresponding min term, said template identifier field including an equation identifier and an obsolete equation identifier; a header memory configured for storing an effect min term and a plurality of equation identifiers, the effect min term specifying which min terms are necessary for comparison, a min term generator configured for simultaneously comparing a received byte of the incoming data packet with the necessary min terms that correspond to the received byte and generating respective min term comparison results; an equation core configured for evaluating equations and generating a frame tag identifying the incoming data packet based on the min term comparison results relative to the templates, the equation core being configured to identify equations which are no longer relevant, and a content addressable memory (CAM) configured to store the equations which are no longer relevant, and a min term controller configured to update the effect min term based on a comparison between the contents of the CAM and the equation identifiers of the header memory.
 8. The filter according to claim 7, wherein the min term controller is configured for fetching the min terms from the min term memory corresponding to a selected byte of an IP frame within the incoming data packet.
 9. The filter according to claim 7, wherein the header memory is a header RAM.
 10. The filter according to claim 7, wherein the obsolete equation identifier specifies whether the corresponding equation is obsolete using one bit.
 11. The filter according to claim 7, further comprising a frame identifier configured for identifying a type of layer 2 packet, the selected byte of the incoming data packet is determined based on the identified type of layer 2 packet.
 12. The filter according to claim 11, wherein the location of each stored min term value is relative to a beginning of an IP frame within the layer 2 packet.
 13. The filter according to claim 11, wherein the equation core generates the frame tag at a wire rate of the incoming data packet and prior to an end of the incoming data packet.
 14. The filter according to claim 7, wherein the min term controller is configured to update the obsolete equation identifier of the min term in the min term memory based on a determination of whether or not the min term is determined to be necessary to evaluate an equation. 